package com.app.mytestapp;

import com.app.view.HandWritingView;

import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.Menu;

public class MainActivity extends Activity {
	
	HandWritingView view;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		view = new HandWritingView(this);
		setContentView(view);
		
		//对话框背景透明
		/*Dialog dlg = new Dialog(this);
		Window wd = dlg.getWindow();
		WindowManager.LayoutParams lp = wd.getAttributes();
		lp.alpha = 0.6f;
		wd.setAttributes(lp);
		dlg.setTitle("哈哈阿斯顿发斯蒂芬");
		dlg.show();*/
		//new MyAsyncTask().execute(null,null,null);
		
	}

	class MyAsyncTask extends AsyncTask<Void, Void, Void>{

		@Override
		protected Void doInBackground(Void... params) {
			System.out.println(Thread.currentThread().getId());
			return null;
		}

		@Override
		protected void onPostExecute(Void result) {
			System.out.println(Thread.currentThread().getId());
			super.onPostExecute(result);
		}
	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
